libkovan
1
The kovan standard library
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
digital.hpp
Go to the documentation of this file.
1
/**************************************************************************
2
* Copyright 2012 KISS Institute for Practical Robotics *
3
* *
4
* This file is part of libkovan. *
5
* *
6
* libkovan is free software: you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation, either version 2 of the License, or *
9
* (at your option) any later version. *
10
* *
11
* libkovan is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
15
* *
16
* You should have received a copy of the GNU General Public License *
17
* along with libkovan. Check the LICENSE file in the project root. *
18
* If not, see <http://www.gnu.org/licenses/>. *
19
**************************************************************************/
20
29
#ifndef _DIGITAL_HPP_
30
#define _DIGITAL_HPP_
31
32
#include "
sensor.hpp
"
33
#include "
export.h
"
34
41
class
EXPORT_SYM
Digital
:
public
Sensor
<bool>
42
{
43
public
:
44
Digital
(
const
unsigned
char
& port);
45
46
virtual
void
setValue(
const
bool
& value);
47
51
virtual
bool
value
()
const
;
52
53
virtual
void
setOutput(
const
bool
& output);
54
virtual
bool
isOutput()
const
;
55
56
virtual
void
setPullup(
const
bool
& pullup);
57
virtual
bool
pullup()
const
;
58
private
:
59
unsigned
char
m_port;
60
};
61
62
#endif
include
kovan
digital.hpp
Generated on Mon Aug 19 2013 00:33:00 for libkovan by
1.8.4